Log4j Interview Questions and Answers
Ques 21. How will you define a root logger turning DEBUG mode off?
# Define the root logger with appender file
log = /usr/home/log4j log4j.rootLogger = WARN, FILE
Is it helpful?
Add Comment
View Comments
Ques 22. What are the other support objects in Log4j?
There are other support objects in the Log4j framework are:
- Level Object
- Filter Object
- Object Renderer
- Log Manager
Is it helpful?
Add Comment
View Comments
Ques 23. In log4j how can you log into the database?
The log4j API provides the object org.apache.log4j.jdbc. JDBCAppender object can put logging information in a particular database.
Is it helpful?
Add Comment
View Comments
Ques 24. Explain whether log4j is a thread safe.
Log4j is a thread-safe, log4j components are built to be used in multithread systems.
Is it helpful?
Add Comment
View Comments
Ques 25. Explain whether a log output format can be customized.
Yes, you can extend the layout class to create your own customized log format. Appenders can be parameterized to use the layout of your choice.
Is it helpful?
Add Comment
View Comments
Most helpful rated by users:
- What is Log4j?
- What are the different logging levels?
- Describe about logger levels in log4j.
- What are the three main components in log4j?
- What is the importance of logging applications?